import request from '@/utils/request'

// 查询项目信息主子列表
export function listMaxIndex(query) {
  return request({
    url: '/project/projectDelivery/listMaxIndex',
    method: 'get',
    params: query
  })
}

// 查询项目阶段名称
export function getScheduleName(query) {
  return request({
    url: '/project/projectDelivery/getScheduleName',
    method: 'get',
    params: query
  })
}

// 查询项目信息主子列表
export function listProjectTree(query) {
  return request({
    url: '/project/projectDelivery/listProjectTree',
    method: 'get',
    params: query
  })
}

// 查询项目进度列表
export function listSchedule(query) {
  return request({
    url: '/project/projectDelivery/list',
    method: 'get',
    params: query
  })
}

// 查询项目进度详细
export function getSchedule(id) {
  return request({
    url: '/project/projectDelivery/' + id,
    method: 'get'
  })
}

// 新增项目进度
export function addSchedule(data) {
  return request({
    url: '/project/projectDelivery',
    method: 'post',
    data: data
  })
}

// 修改项目进度
export function updateSchedule(data) {
  return request({
    url: '/project/projectDelivery',
    method: 'put',
    data: data
  })
}

// 删除项目进度
export function delSchedule(id) {
  return request({
    url: '/project/projectDelivery/' + id,
    method: 'delete'
  })
}
